<%@include file="template/configuration.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>${website} || Manage payment methods</title>
        ${stylesheet}
        ${jquery}
    </head>
    <body>
        <div class="container">
            <%@include file="template/header.jsp" %>
            <div class="content">
                <h1>Manage payment methods</h1>

                <h3>
                    <c:choose>
                        <c:when test="${not empty methodedit}">Edit</c:when>
                        <c:otherwise>Add</c:otherwise>
                    </c:choose>payment method
                </h3>
                <form action="Payment" method="POST">                            
                    <c:choose>
                        <c:when test="${not empty methodedit}">
                        <input type="hidden" value="edit" name="formoption"/>     
                        <input type="hidden" value="${methodedit.id}" name="methodid" />
                        </c:when>
                        <c:otherwise>
                            <input type="hidden" value="add" name="formoption"/>    
                        </c:otherwise>
                    </c:choose>                                     
                    <label for="name">Name</label> <input type="text" name="name" value="${methodedit.name}" id="name" required/></br>
                    <label for="link">Redirect</label> <input type="text" name="link" value="${methodedit.link}" id="link" required/></br>
                    <label>&nbsp;</label> <input type="submit" value="Save method"/>
                </form>         



            </div>
            <%@include file="template/footer.jsp" %>
        </div>
    </body>
</html>
